package org.example;


import org.springframework.amqp.core.*;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
//public class ExchangeConfiguration {

//    @Bean
//    public Queue queue(){
//        return new Queue("object.queue",true);
//    }

//    @Bean
//    public FanoutExchange fanoutExchange(){
////        return ExchangeBuilder.fanoutExchange("te
////        st.fanout2").build();
//        return new FanoutExchange("test.fanout2");
//    }
//    @Bean
//    public Queue fanoutQueue3(){
////        return QueueBuilder.durable("fanout.queue3").build();  //持久化
//        return new Queue("fanout.queue3");
//    }
////    @Bean
////    public Binding fanoutBinding(FanoutExchange fanoutExchange,Queue queue){
////        return BindingBuilder.bind(queue).to(fanoutExchange);
////    }
//    @Bean
//    public Binding fanoutBinding(){
//        return BindingBuilder.bind(fanoutQueue3()).to(fanoutExchange());
//    }


//    @Bean
//    public DirectExchange directExchange(){
//        return new DirectExchange("test.direct2");
//    }
//    @Bean
//    public Queue directQueue3(){
//        return new Queue("direct.queue3");
//    }
//    @Bean
//    public Binding directBinding(DirectExchange directExchange,Queue queue){
//        return BindingBuilder.bind(queue).to(directExchange).with("red");
//    }

//}
